const Router = require('koa-router')

const { 
    list, 
    create, 
    detail, 
    edit, 
    remove 
} = require('../controller/type.controller')
const { verifyAuth } = require('../middleware/auth.middleware')

const typeRouter = new Router({ prefix: '/api/type' });

typeRouter.get('/', list);
typeRouter.get('/:typeId', detail);
typeRouter.post('/',  create);
typeRouter.put('/',  edit);
typeRouter.delete('/:typeId',  remove);

module.exports = typeRouter;